package les

import java.math.BigDecimal;

class MovimentacaoFinanceira {

	String descricao
	BigDecimal valor
	Date data

	static constraints = {
		descricao(blank:false, nullable: false)
		valor(blank:false, nullable: false)
	}

	public String toString() {
		return descricao + " " + valor;
	}

	public void setValor(BigDecimal valor) {
		this.valor = valor?.setScale(2, BigDecimal.ROUND_HALF_UP);
	}
}
